<?
require("config.php");

$location_status .= "| Delete";
$show_backnav = "catalog_menu";
$menuname = NULL;
$menutarget = NULL;

if (NULL!=$action){

	$Query = "DELETE FROM $table WHERE id=$id";
	myQuery($Query);

   header("location:" . $rela_path . "share/msg.php?v=48");

   exit();

}else{

  if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");

	exit();
  
  }

}


$Query = "SELECT 
code,
name,
file 
FROM $table WHERE id=$id LIMIT 1";

$r=myQuery($Query);

$Code=$r[0][0];
$Name=$r[0][1];
$File=$r[0][2];

require($rela_path . "inc/header.php");

?>
<form action="" method="post" enctype="multipart/form-data" name="form1">
<input name="action" type="hidden" value="delete">
<input name="id" type="hidden" value="<?print($id)?>">




<table width="95%" border="0" align="center">
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr> 
    <td valign="top"> <p> Are you sure to delete this catalog ? 
        <input type="submit" class="button" name="Submit2" value="  Yes  ">
        <input type="button" class="button" name="Submit3" value="  No  " onClick="Redirect('catalog_menu.php',1);">
        <br>
        <br>
      <table>
        <tr> 
          <td class="tdheader">Code :</td>
          <td><?print($Code)?></td>
        </tr>
        <tr> 
          <td class="tdheader">Name :</td>
          <td><?print($Name)?></td>
        </tr>
        <tr>
          <td class="tdheader">Download File : </td>
          <td><?print($File)?></td>
        </tr>
      </table>
      <p><br>
        <br>
        <br>
        <br>
      <p>&nbsp;
      <p>&nbsp;
      <p>&nbsp;
      <p>&nbsp;
      <p>&nbsp;
      <p>&nbsp;
      <p>&nbsp;</td>
  </tr>
</table>
<br>
<br>
<br>
<?
require($rela_path . "inc/footer.php");
?>
